import localCache from "../utils/cache";

function permission(pageName, handleName) {
  const permissions = localCache.getItem("permissions");

  const handleBtnPermission = `system:${pageName}:${handleName}`;

  return !!permissions.find((item) => item === handleBtnPermission);
}

export default permission;
